<div class="col-sm-12 mt20">
    <div class="panel panel-default">
        <div class="panel-body" ng-keyup="myKeyup($event)">
            <div class="col-sm-2">  
                <input type="text" class="form-control" placeholder="产品名称" ng-model="searchform.product_name">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="产品编号" ng-model="searchform.product_code">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="景区名称" ng-model="searchform.place_name">
            </div>
            <div class="col-sm-2">
                <button class="btn btn-info search btn-block" ng-click="load()">搜索</button>
            </div>
            <div class="col-sm-2 pull-right">
                <button class="btn btn-info search btn-block" ng-click="save()">添加产品</button>
            </div>
        </div>

        <div class="panel-body">
            <table class="table table-striped table-bordered dataTable table-condensed">
                <thead>
                    <tr>
                        <th class="col-md-2 text-center">产品名称</th>
                        <th class="col-md-1 text-center">产品编号</th>
                        <th class="col-md-1 text-center">景区名称</th>
                        <th class="col-md-1 text-center">产品标签</th>
                        <th class="col-md-1 text-center">排序因子</th>
                        <th class="col-md-1 text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="bean in classProductList">
                        <td>{{bean.product_name}}</td>
                        <td class="text-center">{{bean.product_code}}</td>
                        <td class="text-center">{{bean.place_name}}</td>
                        <td class="text-center">{{bean.labels}}</td>
                        <td class="text-center">
                            <span ng-if="!bean.update_state">{{bean.asort}}</span>
                            <input type="number" class="form-control" placeholder="默认为0" ng-model="bean.asort" ng-if="bean.update_state">
                        </td>
                        <td class="text-center">
                            <button type="button" class="btn btn-info btn-xs" ng-click="bean.update_state=!bean.update_state" ng-if="!bean.update_state">修改</button>
                            <button type="button" class="btn btn-success btn-xs" ng-click="saveone(bean)" ng-if="bean.update_state">保存</button>
                            <button type="button" class="btn btn-info btn-xs" ng-click="delete($index)">删除</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="text-right">
            <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" rotate="false"
            previous-text="上一页" next-text="下一页" first-text="首页" last-text="尾页" max-size="5" 
            boundary-links="true" items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
       </div>

    </div>
</div>